home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 11630 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.5 KB

  1. Path: news.lpr.carel.fi!usenet
  2. From: Ari Lukumies <aril@cmt.lpr.mail.carel.fi>
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Need help with *.def file in Borland 4.0  (Alocating memory)
  5. Date: Fri, 15 Mar 1996 16:10:26 +0200
  6. Organization: Carelcomp Products
  7. Message-ID: <31497A52.6EC0@cmt.lpr.mail.carel.fi>
  8. References: <3148A266.6F24@nando.net>
  9. NNTP-Posting-Host: renoir.cclahti.carel.fi
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0 (WinNT; I)
  14.  
  15. Caius Martius wrote:
  16. > What I am looking for is help on how to
  17. > allocate as much memory as possible.
  18. > I am working on a Windows system with 16 meg of ram and using Borland 4.0
  19.  
  20. You can use GlobalMemoryAlloc and GlobalMemoryFree for requesting memory. If you 
  21. use 16-bit Windows (Win3x), then use large memory model. You'll still have to 
  22. take into account that the addressing is done in 64kB segments, though. You 
  23. could also try the Huge memory model, but it still imposes the 64kB limit on any 
  24. single object and the objects cannot cross segment boundaries. If, OTOH, you use 
  25. 32-bit Windows (Win95, WinNT or Win3x with Win32s installed), you can use 
  26. malloc/calloc/free and access the memory using linear 32-bit offsets (the 
  27. preferred solution). Bear in mind, that in Win3x with Win32s, you can only use 
  28. 32-bit addressing in Windows programs - there is no 32-bit console subsystem (or 
  29. at least, not without the use of a third-party software, such as Phar-Lap's 
  30. TNT).
  31.  
  32. Later,
  33.  AriL
  34. -- 
  35. All my opinions are mine and mine alone.
  36.